<template>
  <div class="header-swiper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="(item, id) of swiperList" :key="id">
        <img :src="item.imgUrl" alt="" />
      </swiper-slide>

      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
export default {
  props: ["swiperList"],
  data() {
    return {
      swiperOption: {
        //循环图片
        loop: true,
        //小圆点
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
      },
    };
  },
};
</script>
<style scoped>
.header-swiper {
  background: #ccc;
  height: 0;
  padding-bottom: 77.5%;
}

.header-swiper img {
  widows: 100%;
  height: 100%;
}
</style>
